runOnStartup(async runtime => {
    cc_Game.addEventListener("minerTick", () => {
        cc_Game.MinerHolePlayerInfoShow.InfoShow()
    })
    cc_Game.addEventListener("minerInit", () => {
    })
})

cc_Game.MinerHolePlayerInfoShow = {
    InfoShow: function () {
        /**
         * @type {ITextInstance}
         */
        let DayText = null
        /**
         * @type {ITextInstance}
         */
        let MoneyText = null
        /**
         * @type {ITextInstance}
         */
        let RopeDistance = null
        /**
         * @type {ITextInstance}
         */
        let HookCount = null

        DayText = runtime.objects.CurdayText?.getFirstInstance()
        MoneyText = runtime.objects.MoneyText?.getFirstInstance()
        RopeDistance = runtime.objects.DistanceText?.getFirstInstance()
        HookCount = runtime.objects.HookCountText?.getFirstInstance()
        var background = "[background=#DCDCDC]"
        DayText.text = background + DayText.instVars[cc_Game.Game_GameStringBranch.Languge] + runtime.globalVars.CurDay
        MoneyText.text = background + MoneyText.instVars[cc_Game.Game_GameStringBranch.Languge] + runtime.globalVars.Money
        RopeDistance.text = background + RopeDistance.instVars[cc_Game.Game_GameStringBranch.Languge] + runtime.globalVars.RopeDistance
        HookCount.text = background + HookCount.instVars[cc_Game.Game_GameStringBranch.Languge] + runtime.globalVars.HookCount
    }
}

export default MinerHolePlayerInfoShow